const { merge } = require('webpack-merge');
const common = require('./webpack.common.js');

const path = require('path');
const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");
const webpack = require('webpack');
const smp = new SpeedMeasurePlugin();

module.exports = smp.wrap(merge(common, { 
    plugins:[
        new webpack.HotModuleReplacementPlugin(),
    ],
    devServer:{
        static: {
            directory: path.join(__dirname, './dist'),
          },
        compress: true,
        port: 9000,
        hot: true, 
        // open:true,
        watchFiles:'./index.html'
    }
}));